//
//  ViewController.m
//  ChangeLineSpaceAndWordSpace
//
//  Created by wangjie on 2018/4/3.
//  Copyright © 2018年 I just want to be a quiet and handsome man. All rights reserved.
//

#import "ViewController.h"
#import "UILabel+ChangeLineSpaceAndWordSpace.h"
#import <Masonry.h>
@interface ViewController ()

@end

@implementation ViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view, typically from a nib.
    
    UILabel * label = [[UILabel alloc]init];
    [self.view addSubview:label];
    [label mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.equalTo(@30);
        make.left.equalTo(@10);
        make.right.equalTo(@(-10));
    }];
    label.numberOfLines = 0;
    label.backgroundColor = [UIColor groupTableViewBackgroundColor];
    label.text = @"改变Label文字行间距 改变Label文字行间距 改变Label文字行间距 改变Label文字行间距 ChangeLineSpace";
    [UILabel changeLineSpaceForLabel:label WithSpace:16];
    
    UILabel * label2 = [[UILabel alloc]init];
    [self.view addSubview:label2];
    [label2 mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.equalTo(label.mas_bottom).offset(20);
        make.left.equalTo(label.mas_left);
        make.right.equalTo(label.mas_right);
    }];
    label2.numberOfLines = 0;
    label2.text = @"改变Label文字字间距 ChangeWordSpace";
    [UILabel changeWordSpaceForLabel:label2 WithSpace:5];
    label2.backgroundColor = [UIColor lightGrayColor];

    UILabel * label3 = [[UILabel alloc]init];
    [self.view addSubview:label3];
    [label3 mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.equalTo(label2.mas_bottom).offset(20);
        make.left.equalTo(label2.mas_left);
        make.right.equalTo(label2.mas_right);
    }];
    label3.numberOfLines = 0;
    label3.text = @"ChangeLineSpaceAndWordSpace 改变行间距和字间距";
    label3.backgroundColor = [UIColor grayColor];
    [UILabel changeSpaceForLabel:label3 withLineSpace:15 WordSpace:15];

    
    
    
    
    
    
}


- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}


@end
